package shuishijie.suishijie.model;

import java.util.List;

/**
 * Created by mindx on 2017/8/29.
 */

public class OrderList{

    /**
     * currentPage : 1
     * list : [{"addr_id":1,"child":[{"goodsCount":"20","goodsName":"2","goods_id":"1061","imgpath":"http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png"},{"goodsCount":"5","goodsName":"2","goods_id":"1061","imgpath":"http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png"},{"goodsCount":"1","goodsName":"1","goods_id":"1061","imgpath":"http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png"},{"goodsCount":"3","goodsName":"1","goods_id":"1061","imgpath":"http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png"},{"goodsCount":"10","goodsName":"1","goods_id":"1061","imgpath":"http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png"},{"goodsCount":"8","goodsName":"test","goods_id":"1061","imgpath":"http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png"}],"createTime":1503454962000,"id":4,"order_id":"15027637630025965","order_status":67,"shipCode":"70264004185905","ship_price":4,"shop_id":1,"totalPrice":74,"user_id":1},{"addr_id":1,"child":[{"goodsCount":"9","goodsName":"一二三四五六七八九十一二三四五六七八九十","goods_id":"1062","imgpath":"http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png"}],"createTime":1502763799000,"finishTime":1503726670000,"id":5,"order_id":"15027637989047270","order_status":30,"shipCode":"70264004185905","shop_id":1,"totalPrice":170,"user_id":1},{"addr_id":1,"child":[{"goodsCount":"9","goodsName":"坦克坦克","goods_id":"11111"}],"createTime":1502768852000,"id":6,"order_id":"15027688519949012","order_status":10,"shipCode":"70264004185905","shop_id":1,"storeUserProfit":78,"totalPrice":170,"user_id":1},{"addr_id":1,"child":[],"createTime":1502768880000,"id":8,"order_id":"15027688804437496","order_status":20,"shipCode":"70264004185905","shop_id":1,"storeUserProfit":78,"totalPrice":170,"user_id":1},{"addr_id":1,"child":[],"createTime":1502768881000,"id":9,"order_id":"15027688812394157","order_status":20,"shipCode":"70264004185905","shop_id":1,"storeUserProfit":78,"totalPrice":170,"user_id":1}]
     * totalPage : 4
     */

    public int currentPage;
    public int totalPage;
    public List<Order> list;

    public static class Order {
        public int splitOrder;

        @Override
        public boolean equals(Object obj) {
            if (obj instanceof Order) {
                return id == ((Order) obj).id;
            }
            return super.equals(obj);
        }

        /**
         * addr_id : 1
         * child : [{"goodsCount":"20","goodsName":"2","goods_id":"1061","imgpath":"http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png"},{"goodsCount":"5","goodsName":"2","goods_id":"1061","imgpath":"http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png"},{"goodsCount":"1","goodsName":"1","goods_id":"1061","imgpath":"http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png"},{"goodsCount":"3","goodsName":"1","goods_id":"1061","imgpath":"http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png"},{"goodsCount":"10","goodsName":"1","goods_id":"1061","imgpath":"http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png"},{"goodsCount":"8","goodsName":"test","goods_id":"1061","imgpath":"http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png"}]
         * createTime : 1503454962000
         * id : 4
         * order_id : 15027637630025965
         * order_status : 67
         * shipCode : 70264004185905
         * ship_price : 4
         * shop_id : 1
         * totalPrice : 74
         * user_id : 1
         * finishTime : 1503726670000
         * storeUserProfit : 78
         */

        public int addr_id;
        public long createTime;
        public int id;
        public String order_id;
        public int order_status;
        public String shipCode;
        public double ship_price;
        public int shop_id;
        public double totalPrice;
        public int user_id;
        public long finishTime;
        public double storeUserProfit;
        public List<Goods> child;

        public static class Goods {
            /**
             * goodsCount : 20
             * goodsName : 2
             * goods_id : 1061
             * imgpath : http://fcp.oss-cn-beijing.aliyuncs.com/goods/e050ae65-c0c9-4dd7-bc3a-536d80885ef9.png
             */

            public String goodsCount;
            public String goodsName;
            public String goods_id;
            public String imgpath;
        }
    }
}
